CXXFLAGS =	-O2 -g -Wall -fmessage-length=0

OBJS =		osAss1.o 



all: clean target osAss1.exe

clean:
	rm -rf build


target:
	mkdir build
osAss1.exe: build/osAss1.o build/Shell.o build/Mailer.o build/Node.o build/OSThread.o build/RT.o build/OSScheduler.o build/Scheduler.o build/Message.o build/UnBoundMailBox.o build/TT.o build/System_Message.o build/RT_Message.o build/BoundMailBox.o

 
	@echo 'linking'
	$(CXX) -o "ass1" $^ -lpthread
	
build/osAss1.o: 
	@echo 'compiling shell'
	$(CXX) -c -o build/osAss1.o osAss1.cpp
	@echo 'shell was compiled'


build/Shell.o: 
	$(CXX) -c -o build/Shell.o Shell.cpp	
build/Mailer.o: 
	$(CXX) -c -o build/Mailer.o Mailer.cpp
build/Node.o: 
	$(CXX) -c -o build/Node.o Node.cpp
build/OSThread.o:
	$(CXX) -c -o build/OSThread.o OSThread.cpp
build/RT.o:
	$(CXX) -c -o build/RT.o RT.cpp
build/OSScheduler.o:
	$(CXX) -c -o build/OSScheduler.o OSScheduler.cpp
build/Scheduler.o:
	$(CXX) -c -o build/Scheduler.o Scheduler.cpp
build/Message.o:
	$(CXX) -c -o build/Message.o Message.cpp 
build/UnBoundMailBox.o:
	$(CXX) -c -o build/UnBoundMailBox.o UnBoundMailBox.cpp
build/TT.o:
	$(CXX) -c -o build/TT.o TT.cpp
build/System_Message.o:
	$(CXX) -c -o build/System_Message.o System_Message.cpp
build/RT_Message.o:
	$(CXX) -c -o build/RT_Message.o RT_Message.cpp
build/BoundMailBox.o:
	$(CXX) -c -o build/BoundMailBox.o BoundMailBox.cpp
	

